<!--待开发发票列表-->
<script type="application/xhtml+xml" id="combine-open-paper">
            <table class="table table-bordered list-bill ffs12 row" style="width: auto;">
                <thead>
                <tr class="form-group">
                    <th style="border-left: 1px solid #dddddd;">发货单号</th>
                    <th>产品</th>
                    <th>数量</th>
                    <th>已开票数量</th>
                    <th>本次开票数量</th>
                    <th>单价</th>
                    <th>税率</th>
                    <th>价税合计金额</th>
                    <th>税额</th>
                    <th>不含税金额</th>
                </tr>
                </thead>
                <tbody>
                <$ list.map(function(item){ $>
                <tr class="form-group">
                    <td style="border-left:1px solid #dddddd;"><$=item.ladingNo $></td>
                    <td><$=item.goodsName $></td>
                    <td><$=item.actual $></td>
                    <td><$=item.paperedNumber $>
                        <input type="hidden" name="orderId" value="<$=item.id $>" />
                    </td>
                    <td style="padding:1px;" >
                            <div class="input-group">
                                <input type="text" class="form-control w85"
                                       name="numbers"
                                       value="<$=floatTool.subtract(item.actual,item.paperedNumber) $>"
                                       max="<$=floatTool.subtract(item.actual,item.paperedNumber) $>"
                                       data-json="<$=JSON.stringify(item)$>"
                                />
                            </div>
                    </td>
                    <td><$=item.price $></td>
                    <td><$=(item.taxRatio*100)+'%' $></td>
                    <td style="padding:1px;">
                        <input
                                readonly="readonly"
                                type="text" class="form-control w85 padding-default"
                                name="total_"
                                value=" <$=floatTool.multiply(floatTool.subtract(item.actual,item.paperedNumber),item.price) $>" />
                    </td>
                    <td style="padding:1px;">
                        <input type="text" name="taxTotal"
                               readonly="readonly"
                               class="form-control w85 padding-default"
                               value="<$=taxTotal(item.taxRatio,floatTool.multiply(floatTool.subtract(item.actual,item.paperedNumber),item.price))$>" />
                    </td>
                    <td style="padding:1px;">
                        <input
                                value="<$=floatTool.subtract(floatTool.multiply(floatTool.subtract(item.actual,item.paperedNumber),item.price),taxTotal(item.taxRatio,floatTool.multiply(floatTool.subtract(item.actual,item.paperedNumber),item.price)))$>"
                                type="text" class="form-control w85 padding-default" name="totalSub" readonly="readonly" />
                    </td>
                </tr>
                <$ })$>
                <tr class="form-group">
                    <td style="border-left:1px solid #dddddd;">合计</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td style="padding:1px;" ></td>
                    <td></td>
                    <td></td>
                    <td style="padding:1px;"></td>
                    <td style="padding:1px;"></td>
                    <td style="padding:1px;"></td>
                </tr>
                </tbody>
            </table>
</script>
<script type="application/xhtml+xml" id="combine-receive-bill">
    <table class="table table-bordered ffs12">
        <thead>
            <tr class="form-group">
                <th></th>
                <th>发货单号</th>
                <th>产品名称</th>
                <th>单价</th>
                <th>品质规格</th>
                <th>数量</th>
                <th>实提数量</th>
                <th>已开票数量</th>
            </tr>
        </thead>
        <tbody>
        <$
        var totalNumber = 0,totalReceive = 0,totalPapered = 0;
        if(list!='undefined'){
        list.map(function(item){
        totalNumber =floatTool.add(totalNumber,item.number);
        totalReceive =floatTool.add(totalReceive,item.actual);
        totalPapered =floatTool.add(totalPapered,item.paperedNumber||0);
        $>
        <tr class="form-group">
            <td><input type="checkbox" <$ if(selected[item.id]){$>checked<$}$> data-json="<$=JSON.stringify(item)$>"/></td>
            <td><$=item.ladingNo $></td>
            <td><$=item.goodsName $></td>
            <td><$=item.price $></td>
            <td><$=item.quality $></td>
            <td><$=item.number $></td>
            <td><$=item.actual $></td>
            <td><$=item.paperedNumber $></td>
        </tr>
        <$})}$>
        <tr class="form-group">
            <td>合计</td>
            <td></td>
            <td></td>
            <td></td>
            <td><$=totalNumber $></td>
            <td><$=totalReceive $></td>
            <td><$=totalPapered $></td>
        </tr>
        </tbody>
    </table>
</script>
